package cn.theten52.demo.patterns.design.behavior.mediation.base;

/**
 * 抽象协作类
 *
 * @author wangjin
 * @date 2021/4/3
 */
public abstract class AbstractColleague {
    protected int number;

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    /**
     * 抽象方法，修改数字时同时修改关联对象
     *
     * @param number 待修改值
     * @param coll   协作者B
     */
    public abstract void changeNumber(int number, AbstractColleague coll);
}
